/**
 * 用开crud LocalStorage的工具
 */

class StorageUtil{

    constructor(){}

    setItem(key,value){
        window.localStorage.setItem(key,value)
    }

    getItem(key){
        return window.localStorage.getItem(key)
    }

    getItemToNum(key){
        const n = this.getItem(key)
        return Number.parseInt(n)
    }

}

export default StorageUtil